# permissions.py
from rest_framework import permissions
from .models import DjChef

class IsChefUser(permissions.BasePermission):
    """验证用户是否是认证厨师"""
    def has_permission(self, request, view):
        return hasattr(request.user, 'chef_profile')